package com.krm;

import java.io.*;

public class WriteSqlFile {

    public void WriteSql(String path , String date) throws FileNotFoundException {

        File file = new File(path);

        if(file.exists()){
            file.delete();
        }
        FileOutputStream fos = new FileOutputStream(file, true);

        // 创建FileOutputStream对应的PrintStream，方便操作。PrintStream的写入接口更便利
        PrintStream out = new PrintStream(fos);
        out.print(date);
        out.close();

    }
}
